<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>New Document</title>

    <script>
      function   to(){
        var  getval =document.getElementById("cc").value;
        window.location.href="b.html?cc="+getval;
      }
    </script>
</head>
<body>
<input type="text" id ="cc" >
 <input type="button"  value="a"  onclick="to()" >
</body>
</html>
